** Replication Code for:
** Terrorism Activates Ethnocentrism to Explain Greater Willingness to 
** Sacrifice Civil Liberties: Evidence from Germany
** Authors: Christina Novak Hansen and Peter Thisted Dinesen 
** Date: 10/02/2021

*-------------------------------------------------------------------------------

clear all
use GGSS2016_analysis.dta
svyset xs11 [pweight=wghtpew], vce(linearized)
keep if german==1 & governmentsplit!=.					

*-------------------------------------------------------------------------------
*Appendix S: Additional robustness check: Results without weights 
*-------------------------------------------------------------------------------


									*Table S1*

*Full ethnocentrism index and civil liberties with reference to terrorism
reg st_terrori c.st_ethno i.sex st_age st_age2 i.proedu2 i.work2 if treatment1!=., vce(robust)
outreg2 using Table_S1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label replace 
reg st_terrori c.st_ethno i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2 if treatment1!=., vce(robust) 
outreg2 using Table_S1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append 
reg st_terrori c.st_ethno##i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2 if treatment1!=., vce(robust) 
outreg2 using Table_S1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append

*Full ethnocentrism index and civil liberties without reference to terrorism
reg st_surveillanceindex c.st_ethno i.sex st_age st_age2 i.proedu2 i.work2 if treatment1!=., vce(robust) 
outreg2 using Table_S1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append 
reg st_surveillanceindex c.st_ethno i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2 if treatment1!=., vce(robust) 
outreg2 using Table_S1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append 
reg st_surveillanceindex c.st_ethno##i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2 if treatment1!=., vce(robust) 
outreg2 using Table_S1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append

*Authorchild and civil liberties with reference to terrorism
reg st_terrori c.st_authorchild i.sex st_age st_age2 i.proedu2 i.work2 if treatment1!=., vce(robust) 
outreg2 using Table_S1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append 
reg st_terrori c.st_authorchild i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2 if treatment1!=., vce(robust) 
outreg2 using Table_S1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append 
reg st_terrori c.st_authorchild##i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2 if treatment1!=., vce(robust) 
outreg2 using Table_S1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append
*Interaction model including both ethnocentrism and authoritarianism
reg st_terrori c.st_ethno##i.treatment1 c.st_authorchild##i.treatment1 i.sex st_age st_age2 i.proedu2 i.work2, vce(robust) 
outreg2 using Table_S1.xls, drop(i.sex st_age st_age2 i.proedu2 i.work2) nocons stats(coef se) dec(2) symbol(**,*) alpha(0.01,0.05) label append


